// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import 'babel-polyfill'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import VueClipboards from 'vue-clipboard2'
import vuex from 'vuex'
import u from './axios.js'
import t from './common.js'

Vue.use(VueClipboards)
Vue.use(vuex)
Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.config.silent = true


let userNum = localStorage.getItem('unreadNum') || 0

var store = new vuex.Store({
  state: {
    userNum: userNum,

  },
  mutations:{
    setuserNum(state,num){
      state.userNum = num
      localStorage.setItem('unreadNum',num)
    }
  },
  getters:{
    isshow(state){
      return state.userNum
    }
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
